--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 046cbbc30c482987d647ddd5093cbafab81301a2
Parents : 8a8d2a7
Author : Mark Qvist <mark@unsigned.io>
Date : 2024-10-13T14:37:45+02:00
Fixed stamp generation status not being displayed in some cases
Changes
2 files changed, 34 insertions(+), 6 deletions(-)
Diff
diff --git a/sbapp/main.py b/sbapp/main.py
index 784128d6..3184b6ae 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -1,6 +1,6 @@
__debug_build__ = False
__disable_shaders__ = False
-__version__ = "1.1.2"
+__version__ = "1.1.3"
__variant__ = ""
import sys
diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py
index 00eaa4e5..d8c7c1a3 100644
--- a/sbapp/sideband/core.py
+++ b/sbapp/sideband/core.py
@@ -1756,6 +1756,9 @@ class SidebandCore():
elif "get_lxm_progress" in call:
args = call["get_lxm_progress"]
connection.send(self.get_lxm_progress(args["lxm_hash"]))
+ elif "get_lxm_stamp_cost" in call:
+ args = call["get_lxm_stamp_cost"]
+ connection.send(self.get_lxm_stamp_cost(args["lxm_hash"]))
else:
connection.send(None)
@@ -4030,12 +4033,37 @@ class SidebandCore():
RNS.log("An error occurred while getting message transfer progress: "+str(e), RNS.LOG_ERROR)
return None
+ def _service_get_lxm_stamp_cost(self, lxm_hash):
+ if not RNS.vendor.platformutils.is_android():
+ return False
+ else:
+ if self.is_client:
+ try:
+ return self.service_rpc_request({"get_lxm_stamp_cost": { "lxm_hash": lxm_hash } })
+
+ except Exception as e:
+ RNS.log("Error while sending message over RPC: "+str(e), RNS.LOG_DEBUG)
+ RNS.trace_exception(e)
+ return False
+ else:
+ return False
+
def get_lxm_stamp_cost(self, lxm_hash):
- try:
- return self.message_router.get_outbound_lxm_stamp_cost(lxm_hash)
- except Exception as e:
- RNS.log("An error occurred while getting message transfer stamp cost: "+str(e), RNS.LOG_ERROR)
- return None
+ if self.allow_service_dispatch and self.is_client:
+ try:
+ return self._service_get_lxm_stamp_cost(lxm_hash)
+
+ except Exception as e:
+ RNS.log("Error while getting message transfer stamp cost: "+str(e), RNS.LOG_ERROR)
+ RNS.trace_exception(e)
+ return False
+
+ else:
+ try:
+ return self.message_router.get_outbound_lxm_stamp_cost(lxm_hash)
+ except Exception as e:
+ RNS.log("An error occurred while getting message transfer stamp cost: "+str(e), RNS.LOG_ERROR)
+ return None
def _service_send_message(self, content, destination_hash, propagation, skip_fields=False, no_display=False, attachment = None, image = None, audio = None):
if not RNS.vendor.platformutils.is_android():
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────